import fetch from '@/utils/fetch'

// 获取所有故障类型
export function apiGetFaultTypeList(listQuery) {
  return fetch({
    url: '/api/v1/dictionary/faultType/all',
    method: 'GET',
    params: listQuery
  })
}

// 获取故障现象代码
export function apiGetFaultAppearanceCode(listQuery) {
  return fetch({
    url: '/api/v1/dictionary/faultAppearance/code',
    method: 'GET',
    params: listQuery
  })
}

// 获取所有故障现象
export function apiGetFaultAppearanceList(listQuery) {
  return fetch({
    url: '/api/v1/dictionary/faultAppearance/all',
    method: 'GET',
    params: listQuery
  })
}

// 获取所有物流公司
export function apiGetLogisticsCompanyList() {
  return fetch({
    url: '/api/v1/dictionary/logisticsCompany/all',
    method: 'GET'
  })
}

// 获取物料信息
export function apiGetMaterielList(listQuery) {
  return fetch({
    url: '/api/v1/materiel/list',
    method: 'GET',
    params: listQuery
  })
}

// 获取物料信息
export function apiGetMaterielListByModelId(modelId) {
  return fetch({
    url: '/api/v1/dictionary/materiel/all',
    method: 'GET',
    params: {
      modelId: modelId
    }
  })
}

// 获取所有型号
export function apiGetModelList(brandId) {
  return fetch({
    url: '/api/v1/dictionary/model/all',
    method: 'GET',
    params: brandId
  })
}

// 获取所有厂商
export function apiGetBrandList() {
  return fetch({
    url: '/api/v1/dictionary/brand/all',
    method: 'GET'
  })
}

// 获取所有地市
export function apiGetCityListByProvinceCode(listQuery) {
  return fetch({
    url: '/api/v1/dictionary/address/province',
    method: 'GET',
    params: listQuery
  })
}

// 获取所有角色类型
export function apiGetRoleTypeList(listQuery) {
  return fetch({
    url: '/api/v1/dictionary/roleType/list',
    method: 'GET',
    params: listQuery
  })
}

// 获取员工部门信息
export function apiGetDepartmentList(listQuery) {
  return fetch({
    url: '/api/v1/dictionary/department/all',
    method: 'GET',
    params: listQuery
  })
}

// 获取员工岗位信息
export function apiGetPositionList(listQuery) {
  return fetch({
    url: '/api/v1/dictionary/position/all',
    method: 'GET',
    params: listQuery
  })
}

// 获取所有芯片工厂
export function apiGetChipFactoryList(listQuery) {
  return fetch({
    url: '/api/v1/dictionary/chipFactory/all',
    method: 'GET',
    params: listQuery
  })
}

// 获取所有生产工厂
export function apiGetFactoryList(listQuery) {
  return fetch({
    url: '/api/v1/dictionary/factory/all',
    method: 'GET',
    params: listQuery
  })
}

// 获取用户所有角色信息
export function apiGetRoleInfoList(listQuery) {
  return fetch({
    url: '/api/v1/userManage/roleInfo',
    method: 'GET',
    params: listQuery
  })
}

// 获取良品库出库类型
export function apiGetGoodProductsOutStockTypeList(listQuery) {
  return fetch({
    url: '/api/v1/dictionary/goodProductsOutStock/outStock',
    method: 'GET',
    params: listQuery
  })
}

// 获取良品库入库类型
export function apiGetGoodProductsInStockTypeList(listQuery) {
  return fetch({
    url: '/api/v1/dictionary/goodProductsInStock/instock',
    method: 'GET',
    params: listQuery
  })
}

// 获取所有省办事处的省代码
export function apiGetProvinceOffice(listQuery) {
  return fetch({
    url: '/api/v1/dictionary/provinceOffice/all',
    method: 'GET',
    params: listQuery
  })
}

// 获取所选省份下的城市
export function apiGetCity(listQuery) {
  return fetch({
    url: '/api/v1/dictionary/address/province',
    method: 'GET',
    params: listQuery
  })
}

// 获取所选城市下的地区
export function apiGetArea(listQuery) {
  return fetch({
    url: '/api/v1/dictionary/address/city',
    method: 'GET',
    params: listQuery
  })
}

// 根据省市代码获取办事处一览
export function apiGetAllPointOffice(listQuery) {
  return fetch({
    url: '/api/v1/dictionary/office/city',
    method: 'GET',
    params: listQuery
  })
}

// 根据省市代码获取外包商一览
export function apiGetOutsourcerByProvince(listQuery) {
  return fetch({
    url: '/api/v1/dictionary/outsourcer/city',
    method: 'GET',
    params: listQuery
  })
}

// 获取办事处一览
export function apiGetAllOffice(listQuery) {
  return fetch({
    url: '/api/v1/dictionary/office/all',
    method: 'GET',
    params: listQuery
  })
}

// 获取外包商一览
export function apiGetAllOutsource(listQuery) {
  return fetch({
    url: '/api/v1/dictionary/outsourcer/all',
    method: 'GET',
    params: listQuery
  })
}

// 获取申请状态信息
export function apiGetApplicationStatus(listQuery) {
  return fetch({
    url: '/api/v1/dictionary/applicationStatus/all',
    method: 'GET',
    params: listQuery
  })
}

// 获取产品类型
export function apiGetProductType(listQuery) {
  return fetch({
    url: '/api/v1/dictionary/product/type',
    method: 'GET',
    params: listQuery
  })
}

// 获取故障现象
export function apiGetFaultAppearance(listQuery) {
  return fetch({
    url: '/api/v1/dictionary/faultAppearance',
    method: 'GET',
    params: listQuery
  })
}
// 获取所有省办事处，外包商的省代码
export function apiGetAllProvinceSource(listQuery) {
  return fetch({
    url: '/api/v1/dictionary/provinceOffice/all/source',
    method: 'GET',
    params: listQuery
  })
}

// 根据省市代码获取办事处，外包商一览
export function apiGetAllPointSource(listQuery) {
  return fetch({
    url: '/api/v1/dictionary/office/all/city',
    method: 'GET',
    params: listQuery
  })
}
